package com.briup.day10;

import com.briup.day10.bean.Employee;
import com.briup.day10.bean.Manager;
import com.briup.day10.bean.Programmer;

public class Test_Override {
    public static void main(String[] args) {
        Employee e = new Employee("001","kevin");
        e.doWork();
        System.out.println("--------------------------------");
        Programmer p=new Programmer("terry","002","高级");
        p.doWork();
        System.out.println("--------------------------------");
        Manager m = new Manager("larry",2005.0,"003");
        m.doWork();
        System.out.println(e.toString()+" "+p+" "+m);//调用的还是这个子类里面的，所以不会是地址
    }
}
